<script type="text/javascript" src="__STATIC__/jquery/jquery-1.7.2.min.js">
	
</script>
<script type="text/javascript">
	$(function(){
		$("#nav .outer .container .top_cate").hover(function(){
			$(this).children('.second_stage').show();
		},function(){
			$(this).children('.second_stage').hide();
		})
	})
</script>
<!--顶部登录注册区域开始-->
	<div id="top">
		<div class="head">
			<ul class="container">
				<if value="$hd.session.username && $hd.session.uid">
					<li><a class="out" href="{|U:'Member/out'}">退出</a></li>
					<li class="myself"><a  href=""><img src="__TEMPLATE__/img/my_face.jpg" class="my_face" alt="" />{$hd.session.username}</a></li>
					<li><a href=""><span class="my_love"></span>我的喜欢</a></li>
				<else/>
				<li><a class="first" href=""><span class="weixin"></span>微信登陆</a></li>
				<li><a href=""><span class="qq"></span>QQ登陆</a></li>
				<li><a href="{|U:'Member/login'}">登陆</a></li>
				<li><a href="{|U:'Member/register'}">注册</a></li>
				</if>
				<li><a href="{|U:'Cart/ajax_add_cart'}"><span class="my_car"></span>我的购物车<i class="num"><if value="$_SESSION['cart']['goods']"> <?php  echo count($_SESSION['cart']['goods']) ?><else/>0</if> </i></a></li>
				<li><a href="{|U:'Porder/index'}"><span class="my_order"></span>我的订单</a></li>
				<li><a href=""><span class="download"></span>下载App</a></li>
				<li><a class="custom" href="">客户服务</a></li>
			</ul>
		</div>
	</div>
	<!--顶部登录注册结束-->
	<!--搜索区域开始-->
		<div id="search"><!--search-->
			<div class="outside"><!--outside-->
				<a class="logo" href=""></a>
				<div class="container"><!--container-->
					<div class="baobei">
						<a href="" class="cat">
							宝贝<span class="triangle"></span>
						</a>
					</div><!--baobei-->
					<div class="magnifier"></div>
					<input placeholder="搜索流行商品" class="search_content" type="text" />
					<input class="sub" type="submit" value="搜索" />
				</div><!--container-->
			</div><!--outside-->
		</div><!--search-->
	<!--搜索区域结束-->
	
	<!--导航条开始-->
	<div id="nav">
		<div class="outer">
			<ul class=container>
				<li><a class="first" href="{|U:'Index/index'}">首页</a></li>
				<?php $cate=K('Category')->get_all_data(array('pid'=>0));
		
		foreach ($cate as $k => $v) {
			$cate[$k]['son']=K('Category')->get_all_data_notree(array('pid'=>$v['cid']));
			foreach ($cate[$k]['son'] as $key => $value) {
				$cate[$k]['son'][$key]['son']=K('Category')->get_all_data_notree(array('pid'=>$value['cid']));
			}
		} ?>
				<foreach from='$cate' key='$k' value='$v'>
				<li class="top_cate">
					<a class="" href="{|U:'List/index',array('cid'=>$v['cid'])}">{$v.cname}<span class="triangle"></span></a>
					<div class="second_stage">
						<foreach from='$v["son"]' key='$key' value='$value'>
						<a href="{|U:'List/index',array('cid'=>$value['cid'])}">{$value.cname}</a>
						</foreach>
					</div><!--second_stage-->
				</li>
				</foreach>
			</ul><!--container-->
		</div><!--outer-->
	</div><!--nav-->

	<!--导航条结束-->